package com.weishu.finace.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.weishu.common.core.web.domain.AjaxResult;
import com.weishu.core.entity.CwCheckBatchDetail;
import com.weishu.core.service.ICwCheckBatchDetailService;
import com.weishu.core.service.ICwCheckBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/checkBathDetail")
public class CheckBathDetailController {

    @Autowired
    private ICwCheckBatchDetailService iCwCheckBatchDetailService;

    /**
     * 对账明细查询
     * @param cwCheckBatchDetail 对账明细信息
     * @param pageNum 开始页
     * @param pageSize 结束页
     * @return
     */
    @RequestMapping("/getList")
    public AjaxResult getList(CwCheckBatchDetail cwCheckBatchDetail, @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize){
        //分页信息
        PageHelper.startPage(pageNum,pageSize);
        PageInfo<CwCheckBatchDetail> pageInfo = iCwCheckBatchDetailService.getList(cwCheckBatchDetail);
        return AjaxResult.success(pageInfo);
    }

}
